//
//  TopImageView.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/7.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "TopImageView.h"

@implementation TopImageView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame])
    {
        [self addOwnView];
    }
    
    return self;
}
-(void)addOwnView
{
    _titlelable=[[UILabel alloc] init];
    _titlelable.font=[UIFont systemFontOfSize:13];
    _titlelable.textAlignment=NSTextAlignmentCenter;
    _titlelable.textColor=[UIColor darkGrayColor];
    _titlelable.text=@"每日任务";
    [self addSubview:_titlelable];
    [_titlelable mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.bottom.equalTo(self);
        make.left.equalTo(self);
        make.right.equalTo(self);
        make.height.mas_equalTo(21);
    }];
    _imageView=[[UIImageView alloc] init];
    [_imageView setImage:[UIImage imageNamed:@"qqkongjian"]];
    [self addSubview:_imageView];
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).with.offset(0);
        make.centerX.equalTo(self);
        make.width.height.mas_equalTo(45);
    }];
    
}


@end
